<template>
  <div>
    <!-- 顶部通栏 -->
    <AppTopnav />
    <!-- 头部 -->
    <AppHeader />
    <!-- 吸顶头部 -->
    <AppHeaderSticky />
    <main class="app-body">
      <!-- 二级路由 -->
      <router-view></router-view>
    </main>
    <!-- 底部 -->
    <AppFooter />
  </div>
</template>

<script>
import { useStore } from 'vuex'
import AppTopnav from '@/components/app-topnav'
import AppHeader from '@/components/app-header'
import AppFooter from '@/components/app-footer'
import AppHeaderSticky from '@/components/app-header-sticky'

export default {
  components: { AppTopnav, AppHeader, AppFooter, AppHeaderSticky },
  setup() {
    const store = useStore()
    store.dispatch('category/getList')
    return {}
  }
}
</script>

<style lang="less" scoped>
.app-body {
  min-height: 600px;
}
</style>